﻿<Window x:Class="SNSpirit.DebugConsole"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:regions="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism"
        xmlns:app="clr-namespace:SNSpirit.Application;assembly=SNSpirit.Core"
        Title="DebugConsole"
        Width="600"
        Height="400"
        Initialized="ShellInitialized"
        regions:RegionManager.RegionManager="{Binding Source=SNSpirit.Application.ApplicationRuntime.Current.Shell.RegionManager}">
    <x:Code>
        <![CDATA[
        void ShellInitialized(object sender, EventArgs e)
        {
            Microsoft.Practices.Prism.Regions.RegionManager.SetRegionManager(this, SNSpirit.Application.ApplicationRuntime.Current.Shell.RegionManager);
        }
        ]]>
    </x:Code>
    <Grid>
        <TabControl regions:RegionManager.RegionName="GlobalDebugRegion">
            <TabControl.ItemTemplate>
                <DataTemplate>
                    <Border MinWidth="80">
                        <TextBlock Margin="5,2"
                                   HorizontalAlignment="Center"
                                   Text="{Binding DataContext.DataContext.Header,
                                                  RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}" />
                    </Border>
                </DataTemplate>
            </TabControl.ItemTemplate>
        </TabControl>
    </Grid>
</Window>